<?php $form=$this->beginWidget('ext.momill.widgets.MActiveForm', array(
	'id'=>'DemoForm',
	'title'=>'表单测试',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions'=>array(
		'class'=>'form-horizontal well'
	)
)); ?>

<?php 
	echo $form->mActiveCtrlGrpText($model,'username','用户名', 'required ajax', array('placeholder'=>'请输入用户名'));
	echo $form->mActiveCtrlGrpPassword($model,'password','密码', 'required', array('placeholder'=>'请输入密码'));
	//echo $form->mActiveCtrlGrpPassword($model,'rememberMe','重复密码', 'required');
	//echo $form->mActiveCtrlGrpCheckbox($model, 'rememberMe', '两周内不用再次登陆');
	//echo $form->checkBoxList($model, 'rememberMe', array('1'=>'男', '2'=>'女'));
?>
<div class="control-group">
	<div class="controls">
		<label class="checkbox">
			<input type="checkbox" name="DemoForm[rememberMe]" value="true"> 记住我
		</label>
	</div>
</div>

<div class="control-group">
	<label class="control-label">爱好</label>
	<div class="controls">
		<label class="checkbox inline">
			<input type="checkbox" name="DemoForm[favorlist][]" value="java"> Java
		</label>
		<label class="checkbox inline">
			<input type="checkbox" name="DemoForm[favorlist][]" value="c"> C/C++
		</label>
		<label class="checkbox inline">
			<input type="checkbox" name="DemoForm[favorlist][]" value="php" checked> PHP
		</label>
	</div>
</div>

<div class="control-group">
	<label class="control-label" for="DemoForm_birthdate">生日</label>
	<div class="controls">
		<input type="date" name="DemoForm[birthdate]" id="DemoForm_birthdate">
	</div>
</div>

<div class="control-group">
	<label class="control-label">性别</label>
	<div class="controls">
		<label class="radio inline">
			<input type="radio" name="DemoForm[gender]" value="male">
			男
		</label>
		<label class="radio inline">
			<input type="radio" name="DemoForm[gender]" value="female" checked>
			女
		</label>
	</div>
</div>

<div class="control-group">
	<label class="control-label" for="DemoForm_comment">注释</label>
	<div class="controls">
		<textarea id="DemoForm_comment" name="DemoForm[comment]" rows="3" placeholder="填写信息"></textarea>
	</div>
</div>

<div class="control-group">
	<label class="control-label">籍贯</label>
	<div class="controls">
		<select name="DemoForm[provience]">
			<option value="sichuan">四川</option>
			<option value="hunan">湖南</option>
			<option value="heilongjiang">黑龙江</option>
		</select>
		<br /><br />
		<select name="DemoForm[city][]" multiple="multiple">
			<option value="chengdu">成都</option>
			<option value="guangyuan">广元</option>
			<option value="suining">遂宁</option>
		</select>
	</div>
</div>

<div class="form-actions">
	<input type="submit" value="确认" class="btn btn-primary">
	<input type="reset" value="重填" class="btn">
	<input type="button" value="返回" class="btn" onclick="javascript:history.go(-1);">
</div>
<?php $this->endWidget(); ?>